import http from "./http";
const base = '/api/isv/';

// 公告接口版块
export default {
  //得到报名表单字段
  async queryModelList(params) {
    Object.assign(params, {
      isPay: "free"
    });
    return await http.post(`${base}temp/queryModelList`, params);
  },
  // PC_根据条件_查询_票务档案_列表—订单维度 
  async queryTicketOrdersByData(params) {
    Object.assign(params, {
      isPay: "free"
    });
    return await http.post(`${base}ticket/queryTicketOrdersByData`, params);
  },
  // PC_根据订单id查询订单下的门票 
  async queryTicketByOrderId(params) {
    Object.assign(params, {
      isPay: "free"
    });
    return await http.post(`${base}ticket/queryTicketByOrderId`, params);
  },
  // PC_根据订单id作废门票
  async delTicketByOrderId(params) {
    Object.assign(params, {
      isPay: "free"
    });
    return await http.post(`${base}ticket/delTicketByOrderId`, params);
  },
  //获取渠道列表
  async queryShareUrlByChannelName(params) {
    return await http.post(`${base}shareUrl/queryShareUrlByChannelName`, params);
  },
  // PC_票类型列表_查询所有被启用的
  async queryTicketTypeListByEnable(params) {
    Object.assign(params, {
      isPay: "free"
    });
    return await http.post(`${base}ticket/queryTicketTypeListByEnable`, params);
  },
  //   团购票赠送
  async sendTicketByData(params) {
    Object.assign(params, {
      isPay: "free"
    });
    return await http.post(`${base}ticket/sendTicketByData`, params);
  },
  // 修改备注
  async updateTicketDetailByTicketId(params) {
    Object.assign(params, {
      isPay: "free"
    });
    return await http.post(`${base}ticket/updateTicketDetailByTicketId`, params);
  },
  // PC_根据条件_查询_票务档案_列表—门票维度 
  async queryTicketsByData(params) {
    Object.assign(params, {
      isPay: "free"
    });
    return await http.post(`${base}ticket/queryTicketsByData`, params);
  },
  // 导出
  async exportTicketsByData(params) {
    Object.assign(params, {
      isPay: "free"
    });
    return await http.post(`${base}/ticket/exportTicketsByData`, params);
  },
  // PC_根据ticketId查询门票详情 
  async queryTicketInfoByTicketId(params) {
    Object.assign(params, {
      isPay: "free"
    });
    return await http.post(`${base}ticket/queryTicketInfoByTicketId`, params);
  },
  // 退款
  async returnTicketOrderByBillcode(params) {
    Object.assign(params, {
      isPay: "free"
    });
    return await http.post(`${base}ticketPurchasePC/returnTicketOrderByBillcode`, params);
  },
  // 发票接口
  async queryInvoiceByPagination(params) {
    Object.assign(params, {
      isPay: "free"
    });
    return await http.post(`${base}invoice/queryInvoiceByPagination`, params);
  },
  // 得到价格组数据
  async getPriceList(params) {
    Object.assign(params, {
      isPay: "free"
    });
    return await http.post(`${base}ticketPurchasePC/queryTicketPrciceGroupListByProjectId`, params)
  },
  // 作废门票
  async delTicketByTicketId(params) {
    Object.assign(params, {
      isPay: "free"
    });
    return await http.post(`${base}ticket/delTicketByTicketId`, params)
  },
  // 个人票赠送
  async sendTicketByPersonal(params) {
    Object.assign(params, {
      isPay: "free"
    });
    return await http.post(`${base}ticket/sendTicketByPersonal`, params)
  },
  // 审核通过不通过
  async approveTicketById(params) {
    Object.assign(params, {
      isPay: "free"
    });
    return await http.post(`${base}ticket/approveTicketById`, params)
  },
}
